Zend_Db Enum Values [Closed]

Posted by scopus on Stack Overflow See other posts from Stack Overflow or by scopus
Published on 2010-04-01T19:45:24Z Indexed on 2010/04/01 20:03 UTC
Read the original article Hit count: 203

Filed under:
|
|

I find this solution

$metadata = $result->getTable()->info('metadata');
echo $metadata['Continent']['DATA_TYPE'];

Hi, I want to get enum values in Zend_Db. My Code:

$select = $this->select();
$result = $select->fetchAll();
print_r($result->getTable());

Output:

Example Object
(
    [_name] => country
    [query] => Zend_Db_Table_Select Object
        (
            [_info:protected] => Array
                (
                    [schema] => 
                    [name] => country
                    [cols] => Array
                        (
                            [0] => Code
                            [1] => Continent

                        )

                    [primary] => Array
                        (
                            [1] => Code
                        )

                    [metadata] => Array
                        (
                            [Continent] => Array
                                (
                                    [SCHEMA_NAME] => 
                                    [TABLE_NAME] => country
                                    [COLUMN_NAME] => Continent
                                    [COLUMN_POSITION] => 3
                                    [DATA_TYPE] => enum('Asia','Europe','North America','Africa','Oceania','Antarctica','South America')
                                    [DEFAULT] => Asia
                                    [NULLABLE] => 
                                    [LENGTH] => 
                                    [SCALE] => 
                                    [PRECISION] => 
                                    [UNSIGNED] => 
                                    [PRIMARY] => 
                                    [PRIMARY_POSITION] => 
                                    [IDENTITY] => 
                                )

I see enum values in data_type but i don't get this values. How can get data_type?

© Stack Overflow or respective owner

Related posts about zend-framework

Related posts about enum